<template>
  <div class="study-item">
    <div class="study-title">
      <div class="item"><slot name="item"></slot></div>
      <div class="nature">
        <slot name="nature-content" class="nature-content"></slot>
        <div class="icon-item" @click="iconClick">
          <div class="iconfont" :class="{iconexit:isCollect}">&#xe629;</div>
        </div>
      </div>
    </div>
  </div>

</template>

<script>
  export default {
    props:{
      itemInfo:{
        type:Object,
        default(){
          return {}
        }
      },
      isCollect:{
        type:Boolean,
        default:true
      }
    },
    data() {
      return {
        // isCollect:false,
      }
    },
    methods: {
      iconClick(){
        this.$emit('addToCollect')
      }
    },
  }
</script>

<style lang="less" scoped>
.study-title{
  width: 100%;
  display: flex;
}
.item{
  display: flex;
  flex: 80%;
}
.nature {
  flex: 12%;
  padding: 1px;
  position: relative;
  border-left: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nature-content {
  flex: 30%;
  padding: 4px;
  border-radius: 6px;
  font-size: 12px;
}
.icon-item {
  flex: 70%;
  display: flex;
  align-items: center;
}
.iconexit {
  color: #f4ea2a !important;
}
.iconfont {
  color: rgb(206, 206, 206);
}

</style>